package org.example.one.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName theme
 */
@TableName(value ="theme")
@Data
public class Theme {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer tid;

    /**
     * 
     */
    private String problem;

    /**
     * 
     */
    private Integer op11;

    /**
     * 
     */
    private String op12;

    /**
     * 
     */
    private Integer op21;

    /**
     * 
     */
    private String op22;

    /**
     * 
     */
    private Date date;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Theme other = (Theme) that;
        return (this.getTid() == null ? other.getTid() == null : this.getTid().equals(other.getTid()))
            && (this.getProblem() == null ? other.getProblem() == null : this.getProblem().equals(other.getProblem()))
            && (this.getOp11() == null ? other.getOp11() == null : this.getOp11().equals(other.getOp11()))
            && (this.getOp12() == null ? other.getOp12() == null : this.getOp12().equals(other.getOp12()))
            && (this.getOp21() == null ? other.getOp21() == null : this.getOp21().equals(other.getOp21()))
            && (this.getOp22() == null ? other.getOp22() == null : this.getOp22().equals(other.getOp22()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTid() == null) ? 0 : getTid().hashCode());
        result = prime * result + ((getProblem() == null) ? 0 : getProblem().hashCode());
        result = prime * result + ((getOp11() == null) ? 0 : getOp11().hashCode());
        result = prime * result + ((getOp12() == null) ? 0 : getOp12().hashCode());
        result = prime * result + ((getOp21() == null) ? 0 : getOp21().hashCode());
        result = prime * result + ((getOp22() == null) ? 0 : getOp22().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", problem=").append(problem);
        sb.append(", op11=").append(op11);
        sb.append(", op12=").append(op12);
        sb.append(", op21=").append(op21);
        sb.append(", op22=").append(op22);
        sb.append(", date=").append(date);
        sb.append("]");
        return sb.toString();
    }
}